@import "../../../../theme.scss";


:host {
  display: block;
  width: 100%;
}

.top{
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  box-sizing: border-box;
  margin-bottom: 20px;

  .stop-power mat-icon{
    margin-right: 10px;
  }
}

mat-tab-group .tab-icon{
  margin-right: 8px;
}

.card-box{
  display: flex;
  align-items: flex-start;
  justify-content: space-between;

  mat-card{
    width: 48%;
    min-height: 400px;
    box-sizing: border-box;

    mat-card-title{
      text-align: center;
      margin-bottom: 20px;
    }

    .car-content{
      display: flex;
      align-items: center;
      justify-content: center;

      .pie{
        width: 500px;
        height: 300px;
        margin-right: 20px;
      }

      .details{
        width: 350px;
      }

    }

    .list{
      display: flex;
      align-items: flex-start;
      justify-content: space-around;

      .left{
        width: 50%;

        .item{
          display: flex;
          align-items: center;
          justify-content: center;
          margin-bottom: 10px;

          .name{
            width: 55px;
            margin-right: 10px;
          }
          .progress{
            width: 80px;
          }
        }
      }

      .right{
        width: 50%;

        .item{
          display: flex;
          align-items: center;
          justify-content: center;
          margin-bottom: 10px;

          .name{
            width: 85px;
            margin-right: 10px;
          }

          .state{
            color: #27AE60;
          }
        }
      }
    }
  }
}

.line-box{
  margin-top: 20px;

  .title{
    text-align: center;
    margin-top: 30px;
  }

  .line{
    height: 400px;
  }
}


.tab2{
  display: flex;
  align-items: center;
  flex-direction: column;

  .display-panel{
    width: 100%;
    box-sizing: border-box;
    margin-bottom: 20px;

    .board{
      display: flex;
      align-items: center;
      justify-content: space-around;
      width: 100%;

      app-vs-chart{
        width: 15%;
        margin: 0 20px;
        transition: all ease-in-out .3s;
      }
    }
    
    .position{
      position: relative;

      span{
        display: flex;
        align-items: center;
        position: absolute;
        right: 30px;
        bottom: 0;
        font-size: 16px;

        mat-icon:first-child{
          margin-right: 20px;
        }
      }
    }

    .battery{
      display: flex;
      flex-wrap: wrap;

      app-battery-eq{
        box-sizing: border-box;
        margin: 0 2px;
        width: calc( ( 100% - 24px ) / 6 );
      }
    }
  }
}


.text-center{
  text-align: center;
}


.import-content{
  min-height: 400px;

  .import-btn {
    position: relative;
  
    input{
      position: absolute;
        font-size: 100px;
        right: 0;
        top: 0;
        opacity: 0;
    }
  }

  .excel-table{
    margin-top: 20px;
    width: 70%;
  }
} 







// 媒体查询部分
@media #{$laptop_screen} {
  .card-box .car-content{
    flex-direction: column;

    .pie{
      width: 100% !important;
      margin-right: 0 !important;
    }
  }
}

@media #{$pad_screen} {
  .card-box .car-content{
    flex-direction: column;

    .pie{
      width: 100% !important;
      margin-right: 0 !important;
    }
  }
  
  .import-content .excel-table{
    width: 100%;
  }
}

@media #{$mobile_screen} {
  .top{
    align-items: center;
    justify-content: center;

    mat-chip-list{
      width: 100%;

      .mat-h2{
        width: 100%;
        margin-bottom: 10px;

        span{
          width: 100%;
          white-space: nowrap;
          text-overflow: ellipsis;
          overflow:hidden;
          font-size: 1em;
        }
      }
    }

    .stop-power{
      width: 50%;
    }
  }

  .card-box{
    flex-direction: column;
    justify-content: center;
    align-items: center;

    mat-card{
      width: 100%;
      margin-bottom: 20px;
      min-height: auto;

      .car-content{
        width: 100%;
        flex-direction: column;
    
        .pie{
          width: 100% !important;
          margin-right: 0 !important;
        }

        .details{
          width: 100%;
        }
      }
    }
  }


  .board{
    flex-wrap: wrap;

    app-vs-chart{
      width: 40% !important;
      margin: 10px !important;
    }
  }

  .position{
    padding-bottom: 40px;
    span{
      right: 50% !important;
      transform: translateX(50%);
    }
  }

  .battery{
    app-battery-eq{
      width: calc((100% - 24px) / 3) !important;
    }
  }

  .import-content .excel-table{
    width: 100%;
  }
}




